package com.tczs.web.service;

import com.alibaba.fastjson.JSONObject;
import com.tczs.client.Client;
import com.tczs.client.bean.Command;
import com.tczs.client.service.ClientService;

public class DatabaseService {

    public JSONObject findAllDatabase(){
        Command command = new Command();
        command.setCommandName("showDatabases");
        String result = ClientService.send(null, command);
        return JSONObject.parseObject(result);
    }

    public JSONObject createDatabase(String databaseName){
        Command command = new Command();
        command.setCommandName("createDatabase");
        command.setDatabaseName(databaseName);
        String send = ClientService.send(null, command);
        return JSONObject.parseObject(send);
    }

}
